using System;
using System.Collections.Generic;
using System.Text;

namespace Objects
{
    public class MenhGiaKhac
    {
        #region MenhGiaKhac variables

        private int _Id;
        private String _LoaiMenhGia;
        private int _Status;
        private int _SapXep;

        #endregion

        #region MenhGiaKhac properties

        public int Id
        {
            get { return _Id; }
            set { _Id = value; }
        }

        public String LoaiMenhGia
        {
            get { return _LoaiMenhGia; }
            set { _LoaiMenhGia = value; }
        }

        public int Status
        {
            get { return _Status; }
            set { _Status = value; }
        }

        public int SapXep
        {
            get { return _SapXep; }
            set { _SapXep = value; }
        }

        #endregion

        #region IPopulatable<MenhGiaKhac> Members

        public MenhGiaKhac Populate(System.Data.DataRow reader)
        {
            MenhGiaKhac item = new MenhGiaKhac();

            try { item.Id = Convert.ToInt32(reader["Id"].ToString()); }
            catch { item.Id = -1; }

            item.LoaiMenhGia = Convert.ToString(reader["MenhGia"].ToString());

            item.Status = Convert.ToInt32(reader["Status"].ToString());
            item.SapXep = Convert.ToInt32(reader["SapXep"].ToString());

            return item;
        }

        #endregion
    }
}
